import { InputType } from '@/utils';

export const SearchConfig: PageConfig = {
    items: [
        {
            itemType: 'text',
            modelKey: 'auxiliaryResourceCoding',
            elInputProps: {
                placeholder: '请输入辅助资源编码'
            },
            columnProps: {
                label: '辅助资源编码'
            },
            validFormatType: InputType.NUMERIC_ALPHABET_SYMBOLS
        },

        {
            itemType: 'select',
            modelKey: 'type',
            elSelectProps: {
                placeholder: '请选择类型',
                options: [
                    { value: 'TOOL', label: '夹具' },
                    { value: 'MOULD', label: '模具' },
                    { value: 'WORK_CLOTH', label: '工装' }
                ]
            },
            columnProps: {
                label: '类型'
            }
        },

        {
            itemType: 'text',
            modelKey: 'creator',
            elInputProps: {
                placeholder: '请输入创建人'
            },
            columnProps: {
                label: '创建人'
            }
        },

        {
            itemType: 'text',
            modelKey: 'auxiliaryResourceName',
            elInputProps: {
                placeholder: '请输入辅助资源名称'
            },
            columnProps: {
                label: '辅助资源名称'
            }
        },
        {
            itemType: 'select',
            modelKey: 'status',
            elSelectProps: {
                placeholder: '请选择状态',
                options: [
                    { value: 'USING', label: '使用中' },
                    { value: 'IDLE', label: '空闲' },
                    { value: 'REPAIRING', label: '维修中' },
                    { value: 'SCRAP', label: '报废' }
                ]
            },
            columnProps: {
                label: '状态'
            }
        },
        {
            itemType: 'date',
            modelKey: 'createTime',
            dateRange: true,
            elDatePickerProps: {
                type: 'daterange',
                rangeSeparator: '-',
                startPlaceholder: '开始时间',
                endPlaceholder: '结束时间'
            },
            columnProps: {
                label: '创建日期'
            }
        }
    ]
};
